package com.xyy.saas.payment.job.syncData;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import com.xyy.elasticjob.client.annotation.ElasticJobConf;
import com.xyy.saas.payment.service.job.impl.DownloadTradeBillService;
import com.xyy.saas.payment.util.DateUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

@ElasticJobConf(name = "xyy.elastic.job.manage.SyncWXTradeBillJob", cron = "0 30 8 * * ?")
@Slf4j
public class SyncWXTradeBillJob implements SimpleJob {
    @Autowired
    private DownloadTradeBillService downloadTradeBillService;

    @Override
    public void execute(ShardingContext shardingContext) {
        /**
         * 荷叶O2O
         */
        downloadTradeBillService.download("1602773490", DateUtil.getYestoday3());

        /**
         * 荷叶自营+国控
         */
        downloadTradeBillService.download("1611876422", DateUtil.getYestoday3());
    }
}
